<%@page contentType="text/html" pageEncoding="UTF-8"%>
<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@taglib prefix="s" uri="/struts-tags" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
    "http://www.w3.org/TR/html4/loose.dtd">

<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <link rel="stylesheet" href="<s:url value="/css/styles.css"/>" type="text/css" media="screen"/>
        <title>Miagetest</title>
    </head>
    <body>
        <h1 class="titre">Miagetest</h1>

        <div>
            <%@include file = "infoSession.jsp" %>
        </div>

        <div>
            <%@include file = "menu.jsp" %>
        </div>

        ${message}

        <!-- Selon la page demandée, on va appeler une jsp différente -->
        <c:choose>
            <c:when test="${page == 'listeClients'}"><%@include file = "listeClients.jsp" %></c:when>
            <c:when test="${page == 'creerClientForm'}"><%@include file = "creerClientForm.jsp" %></c:when>
            <c:when test="${page == 'modifierClientForm'}"><%@include file = "modifierClientForm.jsp" %></c:when>
            <c:when test="${page == 'listeCategories'}"><%@include file = "listeCategories.jsp" %></c:when>
            <c:when test="${page == 'voirCategorie'}"><%@include file = "voirCategorie.jsp" %></c:when>
            <c:when test="${page == 'creerCategorieForm'}"><%@include file = "creerCategorieForm.jsp" %></c:when>
            <c:when test="${page == 'modifierCategorieForm'}"><%@include file = "modifierCategorieForm.jsp" %></c:when>
            <c:when test="${page == 'listeProduits'}"><%@include file = "listeProduits.jsp" %></c:when>
            <c:when test="${page == 'creerProduitForm'}"><%@include file = "creerProduitForm.jsp" %></c:when>
            <c:when test="${page == 'modifierProduitForm'}"><%@include file = "modifierProduitForm.jsp" %></c:when>
            <c:when test="${page == 'creerCommandeForm'}"><%@include file = "creerCommandeForm.jsp" %></c:when>
            <c:when test="${page == 'listeCommandes'}"><%@include file = "listeCommandes.jsp" %></c:when>
            <c:when test="${page == 'listeCommandesClient'}"><%@include file = "listeCommandesClient.jsp" %></c:when>

            <c:otherwise>
                default
            </c:otherwise>
        </c:choose>

    </body>
</html>
